import request from "../utils/request";


/**
 * 获取商品列表
 * @param {*} obj 
 * @returns 
 */
export const GetGoods = (obj) => {
    return request({
        url: 'api/Admin/GetGoods',
        method: "get",
        params: obj,
    });
};

/**
 * 获取单件商品
 * @param {*} obj 
 * @returns 
 */
export const GetSingleGoods = (obj) => {
    return request({
        url: 'api/Admin/GetSingleGoods',
        method: "get",
        params: obj,
    });
};

/**
 * 获取商品订单详情
 * @param {*} obj 
 * @returns 
 */
export const GetGoodsOrderDetails = (obj) => {
    return request({
        url: 'api/Admin/GetGoodsOrderDetails',
        method: "get",
        params: obj,
    });
};

/**
 * 获取商品订单详情
 * @param {*} obj 
 * @returns 
 */
export const GetInventorys = (obj) => {
    return request({
        url: 'api/Admin/GetInventorys',
        method: "get",
        params: obj,
    });
};

/**
 * 删除商品
 * @param {*} obj 
 * @returns 
 */
export const DelGoods = (obj) => {
    return request({
        url: 'api/Admin/DeleteGoods',
        method: 'POST',
        data: obj
    })
}

/**
 * 上架下架商品
 * @param {*} obj 
 * @returns 
 */
export const ShelveGoods = (obj) => {
    return request({
        url: 'api/Admin/ShelveGoods',
        method: 'POST',
        data: obj
    })
}

/**
 * 补货
 * @param {*} obj 
 * @returns 
 */
export const Addlneve = (obj) => {
    return request({
        url: 'api/Admin/AddInventory',
        method: 'POST',
        data: obj
    })
}

/**
 * 启用禁用商品
 * @param {*} obj 
 * @returns 
 */
export const BanGoods = (obj) => {
    return request({
        url: 'api/Admin/BanGoods',
        method: 'POST',
        data: obj
    })
}

/**
 * 启用禁用商品
 * @param {*} obj 
 * @returns 
 */
export const addGoods = (obj) => {
    return request({
        url: 'api/Admin/AddGoods',
        method: 'POST',
        data: obj
    })
}